package com.zt.teacher.dao;

import com.zt.common.pojo.homework.Homework;
import com.zt.common.pojo.homework.HomeworkAnswer;
import com.zt.teacher.dto.HomeworkWithClassDTO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * description:
 * author:zt
 * date:2022-02-10
 */
@Mapper
public interface HomeworkDao {

    void insert(Homework homework);

    List<Homework> getByClassId(int classId);

    List<HomeworkWithClassDTO> getBySemester(@Param("teacherId") String teacherId, @Param("semester") String semester);

    Homework getByHomeworkId(int homeworkId);

    void delete(int id);

    void update(HomeworkAnswer homeworkAnswer);

    HomeworkAnswer getByHomeworkIdAndStuId(@Param("studentId") String studentId,@Param("homeworkId") int homeworkId);
}
